cmake_minimum_required(VERSION 3.9)

set(PARSE_FILES
        CMCommandLineParser.cpp
        CMCommandLineParser.h
        CMLock.cpp
        CMLock.h
        CMTimeout.cpp
        CMTimeout.h
        cm_thread_task_manager.cpp
        cm_thread_task_manager.h
        )

include_directories(${CMAKE_SOURCE_DIR}/common/utils)
link_directories(${CMAKE_BUILD_RPATH}/common/utils)

add_library(jkfuncs
        ${PARSE_FILES})

add_executable(cmd_parse_test
        cm_command_parse_test.cpp
        ${PARSE_FILES}
        )

target_link_libraries(cmd_parse_test
        utils
        pthread
)       

set(OBSERVER_FILES
        CMObserver.cpp
        CMObserver.h
        )

add_executable(observer_test
        cm_observer_test.cpp
        ${OBSERVER_FILES}
        )

target_link_libraries(observer_test
        utils
        pthread
        )

add_executable(cm_thread_task_manager
        cm_thread_task_manager_test.cpp
        ${PARSE_FILES}
)

target_link_libraries(cm_thread_task_manager
        utils
        pthread
)
